<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
        <title>0.0 0.0</title>
        <script type="text/javascript" src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.2"></script>
        <script type="text/javascript">
            //<![CDATA[
            var map;
            function parseCoords() {
                data = document.location.href.split("?");
                if (data.length < 2) {
                    res = new Array(20.0, 0.0, 1);
                } else {
                    c = data[1].split(",");
                    lat = c[0]; lng = c[1];
                    res = new Array(parseFloat(lat), parseFloat(lng), 11);
                };
                return res;
            };
            function clickFunc(event) {
                if (event.leftMouseButton) {
                    point = map.PixelToLatLong(new VEPixel(event.mapX, event.mapY));
                    document.title = point.Latitude.toFixed(5) + " " + point.Longitude.toFixed(5);
                    map.DeleteAllShapes();
                    shape = new VEShape(VEShapeType.Pushpin, point);
                    map.AddShape(shape);
                };
            };
            function initialize() {
                res = parseCoords();
                lat = res[0]; lng = res[1]; zoom = res[2];
                map = new VEMap('map_canvas');
                map.SetDashboardSize(VEDashboardSize.Small);
                map.HideScalebar();
                map.LoadMap();
                map.Resize();
                centre = new VELatLong(lat, lng);
                map.SetCenterAndZoom(centre, zoom);
                if (lat != 20 || lng != 0) {
                    ev = new Object();
                    pix = map.LatLongToPixel(centre);
                    ev.leftMouseButton = true; ev.mapX = pix.x; ev.mapY = pix.y;
                    clickFunc(ev);
                };
                map.AttachEvent("onclick", clickFunc);
            };
            //]]>
        </script>
    </head>
    <body onload="initialize();">
        <div id='map_canvas' style="position:relative; width:300px; height:250px;"></div>
    </body>
</html>
